//
//  CMDBFilterCollectionViewCell.swift
//  CMDB
//
//  Created by 曹桂祥 on 17/4/26.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

class CMDBFilterCollectionViewCell: CMDBBaseCollectionViewCell {
    
    var thisView : UIView!
    
    var titleBtn : UIButton!
    
    var titleName : String? {
        
        didSet{
            
        }
        
    }

    override func buildCollectionCell() {
        super.buildCollectionCell()
        
        buildSubViews()
    }
    
    override func buildSubViews() {
        thisView = UIView.getInstance()
        
        thisView.frame = self.bounds
        
        contentView.addSubview(thisView)
        
        titleBtn = UIButton(title: "实体标签1", borderColor: UIColor.Hex(0xff6d00), titleSizeFont: CMDB_15_FONT, isShowBorder: true)
        
        titleBtn.addTarget(self, action: #selector(titleBtnClick), forControlEvents: .TouchUpInside)
        
        titleBtn.frame = CGRect(x: 0, y: 0, width: titleBtn.width + 15, height: titleBtn.height)
        
        titleBtn.setTitleColor(UIColor.Hex(0xff6d00), forState: .Normal)
        
        titleBtn.userInteractionEnabled = false
        
        contentView.addSubview(titleBtn)
    }

}


extension CMDBFilterCollectionViewCell{
    
    @objc func titleBtnClick(){
        printLog("nameBtn Click")
    }
    
}